import * as Sequelize from 'sequelize';
import sequelize from './../core/mysqlDb';

export interface UserInfo {
    id: number;
    userToken:string;
    loginName:string;
    pwd:string;
    storName:string;
    storCode:string;
}
export interface UserInfostance extends Sequelize.Instance<UserInfo>, UserInfo {
}
// export const userInfoModel = sequelize.define<UserInfostance, UserInfo>('user_infos', {
//     userToken:Sequelize.TEXT,
//     loginName:Sequelize.STRING,
//     pwd:Sequelize.STRING,
//     storName:Sequelize.STRING,
//     storCode:Sequelize.STRING
// });

export const userInfoModel = sequelize.define('user_infos', {
    userToken:Sequelize.TEXT,
    loginName:Sequelize.STRING,
    pwd:Sequelize.STRING,
    storName:Sequelize.STRING,
    storCode:Sequelize.STRING
});

userInfoModel.sync();
export default userInfoModel;
